package model

import (
	"gorm.io/gorm"
	"time"
)

type TestOption struct {
	Id               uint64         `gorm:"column:id;type:int UNSIGNED;primaryKey;not null;" json:"id"`
	TestManagementId uint64         `gorm:"column:test_management_id;type:int UNSIGNED;not null;" json:"test_management_id"`
	Select           string         `gorm:"column:select;type:varchar(30);comment:选项;not null;" json:"select"`   // 选项
	Option           string         `gorm:"column:option;type:varchar(255);comment:选项值;not null;" json:"option"` // 选项值
	CreatedAt        time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt        time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt        gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (t *TestOption) TableName() string {
	return "test_option"
}
